package com.inkrl.payment.controller;

import com.inkrl.payment.service.PaymentService;
import com.jt.common.pojo.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class PaymentController {
    @Autowired
    private PaymentService paymentService;
    @PostMapping("payment")
    public Order payment(String address,String phone,String receiver,
            String product,String count,HttpServletRequest request){
        String token = request.getHeader("token");
        return paymentService.payment(address,phone,receiver,product,count,token);
    }
}
